#ifndef _INCLUDE_BSP_KEY_H_
#define _INCLUDE_BSP_KEY_H_

#include <stm32f10x_gpio.h>
#include <stddef.h>
#include <stdbool.h>

#define KEY_STATE_DOWN			Bit_RESET
#define KEY_STATE_UP			Bit_SET
#define KEY_STATE				BitAction

typedef enum
{
	KEY_EVENT_DOWN,
	KEY_EVENT_UP
}KEY_EVENT;

typedef union
{
    uint8_t		uiByte[2];
    uint16_t	uiKeyCode;
}KEY_VALUE;

typedef void(*KEY_EVENT_CB_FP)(uint16_t uiKeyCode, KEY_EVENT eEvent);

void		Key_Initialize(void);
void		Key_Scan(void);
void		Key_RegisterEventProc(KEY_EVENT_CB_FP fpKBEventCallBackFunc);
KEY_STATE	Key_CheckKeyState(uint8_t uiKeyCode);

#endif



